/** \file libSMGS_DefaultConfig.h
 *  \brief     简易MQTT网关协议栈默认配置
 *  \author    何亚红
 *  \version   20220208
 *  \date      2022
 *  \copyright MIT License.
 */

#ifndef __libSMGS_DefaultConfig_h__
#define __libSMGS_DefaultConfig_h__

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
#include "stdio.h"
#include "stdlib.h"
#include "stdint.h"
#include "string.h"
#include "stdbool.h"
#include "math.h"

/*
导入config.h的配置
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H

#ifndef CONFIG_SMGS_MAX_TOPIC_LENGTH
#define CONFIG_SMGS_MAX_TOPIC_LENGTH 128 /**< 主题最大长度 */
#endif // CONFIG_SMGS_MAX_TOPIC_LENGTH

#ifndef CONFIG_SMGS_TOPIC_MAX_NUMBER_OF_CMD_PARAMETERS
#define CONFIG_SMGS_TOPIC_MAX_NUMBER_OF_CMD_PARAMETERS 3 /**< 主题最大命令参数个数 */
#endif // CONFIG_SMGS_TOPIC_MAX_NUMBER_OF_CMD_PARAMETERS

#ifndef SMGS_TOPIC_NUMBER_OF_PLIES
#define SMGS_TOPIC_NUMBER_OF_PLIES (CONFIG_SMGS_TOPIC_MAX_NUMBER_OF_CMD_PARAMETERS+5) /**< 主题消息层数 */
#endif // SMGS_TOPIC_NUMBER_OF_PLIES


#ifndef CONFIG_SMGS_MAX_PAYLOAD_LENGTH
#define CONFIG_SMGS_MAX_PAYLOAD_LENGTH 128 /**< 负载最大长度 */
#endif // CONFIG_SMGS_MAX_PAYLOAD_LENGTH

#ifndef CONFIG_SMGS_MIN_GATEWAY_SERIALNUMBER_LENGTH
#define CONFIG_SMGS_MIN_GATEWAY_SERIALNUMBER_LENGTH 16 /**< 网关序列号的最小长度 */
#endif // CONFIG_SMGS_MIN_GATEWAY_SERIALNUMBER_LENGTH


#ifndef CONFIG_SMGS_DEVICE_INTERNAL_CMDID_1_START
#define CONFIG_SMGS_DEVICE_INTERNAL_CMDID_1_START 0x0000 /**< 设备模块内部命令ID起始1 */
#endif // CONFIG_SMGS_DEVICE_INTERNAL_CMDID_1_START

#ifndef CONFIG_SMGS_DEVICE_INTERNAL_CMDID_1_STOP
#define CONFIG_SMGS_DEVICE_INTERNAL_CMDID_1_STOP 0xFFF /**< 设备模块内部命令ID结束1 */
#endif // CONFIG_SMGS_DEVICE_INTERNAL_CMDID_1_STOP

#ifndef CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_1_START
#define CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_1_START 0x0000 /**< 设备模块内部寄存器起始1 */
#endif // CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_1_START

#ifndef CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_1_STOP
#define CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_1_STOP  0x0007 /**< 设备模块内部寄存器结束1 */
#endif // CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_1_STOP


#ifndef CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_2_START
#define CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_2_START 0x0020 /**< 设备模块内部寄存器起始2 */
#endif // CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_2_START

#ifndef CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_2_STOP
#define CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_2_STOP  0x0FFF /**< 设备模块内部寄存器结束2 */
#endif // CONFIG_SMGS_DEVICE_INTERNAL_REGISTER_2_STOP


#ifndef CONFIG_SMGS_GATEWAY_INTERNAL_CMDID_1_START
#define CONFIG_SMGS_GATEWAY_INTERNAL_CMDID_1_START 0x0000 /**< 网关模块内部命令ID起始1 */
#endif // CONFIG_SMGS_GATEWAY_INTERNAL_CMDID_1_START

#ifndef CONFIG_SMGS_GATEWAY_INTERNAL_CMDID_1_STOP
#define CONFIG_SMGS_GATEWAY_INTERNAL_CMDID_1_STOP 0xFFF /**< 网关模块内部命令ID结束1 */
#endif // CONFIG_SMGS_GATEWAY_INTERNAL_CMDID_1_STOP

#ifndef CONFIG_SMGS_GATEWAY_INTERNAL_REGISTER_1_START
#define CONFIG_SMGS_GATEWAY_INTERNAL_REGISTER_1_START 0x0000 /**< 网关模块内部寄存器起始1 */
#endif // CONFIG_SMGS_GATEWAY_INTERNAL_REGISTER_1_START

#ifndef CONFIG_SMGS_GATEWAY_INTERNAL_REGISTER_1_STOP
#define CONFIG_SMGS_GATEWAY_INTERNAL_REGISTER_1_STOP  0x0FFF /**< 网关模块内部寄存器结束1 */
#endif // CONFIG_SMGS_GATEWAY_INTERNAL_REGISTER_1_STOP

#ifndef CONFIG_SMGS_GATEWAY_WILL_QOS
#define CONFIG_SMGS_GATEWAY_WILL_QOS  0 /**< 网关遗嘱QOS */
#endif // CONFIG_SMGS_GATEWAY_WILL_QOS

#ifndef CONFIG_SMGS_GATEWAY_WILL_RETAIN
#define CONFIG_SMGS_GATEWAY_WILL_RETAIN 0 /**< 网关遗嘱RETAIN */
#endif // CONFIG_SMGS_GATEWAY_WILL_RETAIN

#ifndef CONFIG_SMGS_SERVER_DEFAULT_NAME
#define CONFIG_SMGS_SERVER_DEFAULT_NAME "DefaultServer"
#endif // CONFIG_SMGS_SERVER_DEFAULT_NAME



#ifdef __cplusplus
}
#endif // __cplusplus

#endif // __libSMGS_DefaultConfig_h__
